home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / CommToolbox (modified) / Headers / CAbstractBuffer.h next >
Encoding:
C/C++ Source or Header  |  1994-11-30  |  1.3 KB  |  49 lines  |  [TEXT/KAHL]

  1. /******************************************************************************
  2.  CAbstractBuffer.h
  3.  
  4.         Interface for CAbstractBuffer class.
  5.         
  6.     SUPERCLASS = CObject
  7.     
  8.     Copyright © 1994-95 Ithran Einhorn. All rights reserved.
  9.  ******************************************************************************/
  10.  
  11. #pragma once
  12.  
  13. #include "CObject.h"
  14.  
  15. #ifndef tCharBuf
  16. typedef unsigned char  tCharBuf[5];
  17. #endif
  18.  
  19. class CAbstractBuffer : public CObject
  20. {
  21.     private:
  22.     
  23.     public:
  24.     
  25.     void        IAbstractBuffer(void);
  26.     
  27.     /** Text Specification **/
  28.     virtual void    SetTextPtr(Ptr textPtr, long numChars);
  29.     virtual void    UseTextHandle(Handle textHandle);
  30.     virtual void    InsertTextPtr(Ptr insertPtr, long insertLen);
  31.     virtual Handle    CopyTextRange(long start, long end);
  32.     virtual void    ReplaceSelection(Ptr replacePtr, long replaceLen);
  33.  
  34.     /** Accessing **/
  35.     virtual Handle    GetTextHandle(void);
  36.     virtual Handle    GetRawTextHandle(void);
  37.     
  38.     virtual long    FindLine(long charPos);
  39.     virtual long    GetLineStart(long line);
  40.     virtual long    GetLineEnd(long line);
  41.     virtual short    GetLineLength(long line);
  42.     virtual long    GetLength(void);
  43.     virtual long    GetNumLines(void);
  44.     virtual void    GetSelection(long *selStart, long *selEnd);
  45.     virtual void    GetCharBefore(long *aPosition, tCharBuf charBuf);
  46.     virtual void    GetCharAfter(long *aPosition, tCharBuf charBuf);
  47.     virtual long    GetGapPosition(void);
  48.     virtual long    GetGapLength(void);
  49. };